﻿//-----------------------------------------------------------------------
// <copyright file="StateChangedEventArgs.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using System;

#endregion

namespace GateShift.Services.SDK.Services.Events
{
    /// <summary>
    /// EventArgs for when a threaded service's running state changes
    /// </summary>
    public class StateChangedEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the StateChangedEventArgs class
        /// </summary>
        /// <param name="newState">New ServiceState for the service</param>
        /// <param name="previousState">Previous ServiceState for the service</param>
        public StateChangedEventArgs(ServiceState newState, ServiceState previousState)
        {
            PreviousState = previousState;
            NewState = newState;
        }

        /// <summary>
        /// Gets the last ServiceState for the service
        /// </summary>
        public ServiceState PreviousState { get; private set; }

        /// <summary>
        /// Gets the next ServiceState for the service
        /// </summary>
        public ServiceState NewState { get; private set; }
    }
}